package com.gsww.vue.controller.sys;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.gsww.vue.service.sys.SysParameterTypeService;
@RestController
@RequestMapping(value = "/sys")
public class SysParameterTypeController {
	@Autowired
	private SysParameterTypeService sysParameterTypeService;
	/**
	 * 获取参数类型列表
	 * @param pageNumber
	 * @param pageSize
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/paraTypeList",method = RequestMethod.GET)
	@ResponseBody
	public Map<String,Object> operatorList(@RequestParam String  paraTypeName,@RequestParam String  pageNo,@RequestParam String  pageSize,
			HttpServletRequest request,HttpServletResponse response) {
		Map<String,Object> resMap = new HashMap<String,Object>();
		try{
			
			Map<String,Object> map = sysParameterTypeService.getParaTypeList(paraTypeName, pageNo, pageSize);
			resMap.put("data", map);
			resMap.put("success", true);
		}catch(Exception ex){
			resMap.put("success", false); 
			ex.printStackTrace();
		}
		return resMap;
	}
}
